<!DOCTYPE html>
<html ng-app="app">
<head>
    <title>任务计划</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../build/common/gridList.css" rel="stylesheet">
    <script type="text/javascript" src="../../build/common/gridList.js"></script>
    <script type="text/javascript" src="../../assets/js/plugins/angular/angular.min.js"></script>
    <script type="text/javascript" src="../../assets/js/plugins/angular/animate.js"></script>
    <script type="text/javascript" src="../../assets/js/common/base/baseService.js"></script>
    <script type="text/javascript" src="../../assets/js/common/base/baseDirective.js"></script>
</head>
<body ng-controller="ctrl" ng-init="init()">

<div class="panel panel-default search-panel">
    <div class="panel-heading">查询条件
        <a href="javascript:void(0)" class="pull-right">　<i class="fa  fa-angle-double-up"
                                                            toggle-collapse="#searchForm"></i> </a>
    </div>

    <div class="panel-body">
        <form id="searchForm" class="form-horizontal">
            <div class="form-group">
                <label class="control-label col-sm-1" for="name_^VLK">任务名</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="name_^VLK">
                </div>

                <label class="control-label col-sm-1" for="group_^VEQ">任务分组</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="group_^VEQ">
                </div>

                <label class="control-label col-sm-1" for="running_state_^VEQ">运行状态</label>
                <div class="col-sm-2">
                    <select class="form-control" id="running_state_^VEQ">
                        <option value="">请选择</option>
                        <option value="ENABLE">启用</option>
                        <option value="DISABLE">禁用</option>
                    </select>
                </div>

                <div class="col-sm-3" style="text-align:left;">
                    <button type="button" style="margin-left:50px" class="btn btn-primary fa-search">查询</button>
                    <button type="button" style="margin-left: 50px" class="btn btn-primary fa-rotate-left">重置</button>
                </div>
            </div>

        </form>

    </div>

    <div class="btn-group toolbar">
        <button class="btn btn-outline btn-primary fa-plus" openDialog="新增计划" url="sysJobEdit.html">新增</button>
    </div>

    <table ab-grid data-id-field="id" data-url="/sys/scheduleJob/list">
        <thead>
        <tr>
            <th data-checkbox="true">ID</th>
            <th data-field="name">任务名称</th>
            <th data-field="group">任务分组</th>
            <th data-field="invokeTarget">执行目标</th>
            <th data-field="cronExpression">运行表达式</th>
            <th data-field="description">任务描述</th>
            <th data-field="runningState">运行状态</th>
            <th data-field="script" data-title="管理" data-formatter="innerHtmlFormatter">
                <span class='btn btn-outline btn-primary fa fa-play' sendAction='立即运行' qtip='立即运行' url='/sys/scheduleJob/runOnce?id={id}'></span>
                <span class='btn btn-outline btn-primary fa fa-edit' openDialog='编辑' qtip='编辑' url='sysJobEdit.html?id={id}'></span>
                <span class='btn btn-outline btn-primary fa fa-history' opendialog="运行记录" qtip='运行记录' url='sysJobLogList.html?id={id}'></span>
                <span class='btn btn-outline btn-primary fa fa-trash' sendAction='删除' qtip='删除' url='/sys/scheduleJob/remove?id={id}'></span>
                <span if="'{runningState}' == 'ENABLE'" class='btn btn-outline btn-primary fa fa-pause' sendAction='禁用' qtip='禁用' url='/sys/scheduleJob/enable?id={id}&enable=false'></span>
                <span if="'{runningState}' == 'DISABLE'" class='btn btn-outline btn-primary fa fa-play-circle' sendAction='启用' qtip='启用' url='/sys/scheduleJob/enable?id={id}&enable=true'></span>
            </th>
        </tr>
        </thead>
    </table>
</div>

<script type="text/javascript">
   var app = angular.module("app", ['base', 'baseDirective']);
    app.controller('ctrl', ['$scope', 'baseService', 'ArrayToolService', '$filter', function ($scope, baseService, ArrayToolService, $filter) {

        /**
         * 初始化操作
         */
        $scope.init = function () {

        };

    }]);
</script>
</body>
</html>